<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{determinedRecordHistoryList.firstResult}"></f:viewParam>	
	   	<f:viewParam name="moduleName" value="待定名单管理"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
   
		<h:form id="searchForm">
			<p:panel id="searchResult">
				<f:facet name="header">待定名单审核历史记录</f:facet>
				<p:dataTable value="#{determinedRecordHistoryList.resultList}" var="_his">
					
					<p:column>
						<f:facet name="header">提报人</f:facet>
						<h:outputText value="#{_his.submitUserCnname}"  >
						</h:outputText>
					</p:column>
					
					<p:column>
						<f:facet name="header">审核人</f:facet>
						<h:outputText value="#{_his.au}" />
					</p:column>
					
					<p:column>
						<f:facet name="header">中介机构名称</f:facet>
						<h:outputText value="#{_determinedRecord.supplier.cnname}" />
					</p:column>
					
					<p:column>
						<f:facet name="header">整改截至日期</f:facet>
						<h:outputText value="#{_determinedRecord.endDate}"  >
							<f:convertDateTime pattern="yyyy-MM-dd"/>
						</h:outputText>
					</p:column>
					<c:set var="status" value="#{_determinedRecord.auditted &amp;&amp; _determinedRecord.recordStatus eq 'Deleted' ? '整改完成' :'整改未完成'}" />
					<p:column>
						<f:facet name="header">整改状态</f:facet>
						#{status}
					</p:column>
					
					<c:set var="editTitle" value="#{empty _determinedRecord.auditted ? '编辑并提交' : '重新编辑并提交'}" />
					<p:column style="text-align: center;width:200px;">
						<f:facet name="header">操作</f:facet>
						<p:button outcome="DeterminedRecordEdit.xhtml" value="#{editTitle}" rendered="#{_determinedRecord.canEdit() &amp;&amp; request.isUserInRole('reporter')}">
							<f:param name="recordId" value="#{_determinedRecord.id}"></f:param>
						</p:button>
						<p:button outcome="DeterminedRecordAudit.xhtml" value="审核" rendered="#{_determinedRecord.canAudit() &amp;&amp; request.isUserInRole('auditor')}">
							<f:param name="recordId" value="#{_determinedRecord.id}"></f:param>
						</p:button>
						<p:button outcome="DeterminedRecordView.xhtml" value="查看" >
							<f:param name="recordId" value="#{_determinedRecord.id}"></f:param>
						</p:button>
						
					</p:column>
				</p:dataTable>
			</p:panel>
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{determinedRecordHistoryList}" />
			</ui:include>
		</h:form>
   	</ui:define>
</ui:composition>
